{-# LANGUAGE ForeignFunctionInterface#-}

-- build: ghc --make convert.hs conv.c
-- see also conv.c

import System
import Foreign.C

foreign import ccall "convert" cConvert::CString->IO Int

main = do
    (cpmFile:_) <- getArgs
    withCString cpmFile $ \f->cConvert f
    return ()